% Technische Universität Dresden
% Fakultät Informatik
% Insitut für Software- und Multimediatechnik
% Professur für Multimediatechnik
%
% LaTeX style for student theses and KOMAScript book class. 
% 2011-10-14 Andreas Rümpel

\KOMAoption{twoside}{false}
%\KOMAoption{headsepline}{true} % doesn't work yet
%\KOMAoption{footsepline}{true} % doesn't work yet
\KOMAoption{numbers}{noenddot}

\usepackage[
	a4paper,
	left=3cm,
	right=3cm, 
	top=2.5cm,
	bottom=3cm
]{geometry} % this kind of margin definition is not recommended
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} % for correct guillemets, http://en.wikibooks.org/wiki/LaTeX/Internationalization#German
\usepackage{lmodern} % to avoid rastered fonts, http://www.komascript.de/node/699

%\usepackage{mathpazo} % palatino linotype
\usepackage{amsmath}
%\usepackage{amscd}
%\usepackage{amsthm}
%\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage[cmyk]{xcolor}
\usepackage{graphicx}
\usepackage{booktabs} % http://www.dante.de/dante/events/mv37/programm/handouts/hoeppner-tabellen.pdf
\usepackage{ifthen} % for checking some conditions
\usepackage{tikz} % TikZ ist kein Zeichenprogramm
\usepackage[colorinlistoftodos]{todonotes} % TODO notes

%\usepackage{gensymb}
%\usepackage[all]{xy}
%\usepackage{pstricks,pst-node}
%\usepackage[center]{subfigure} % for groups of figures (2 figures aligned horizontally)

% http://en.wikipedia.org/wiki/Widows_and_orphans
\clubpenalty=9999
\widowpenalty=9999
\brokenpenalty=100


%### meta data
\def\@mmtype{Seminararbeit}
\def\@mmtitle{TODO set mmtitle}
\def\@mmtshorttitle{TODO set mmtshorttitle}
\def\@mmtauthor{TODO set mmtauthor}
\def\@mmtsubmissionmonth{TODO Januar 1970}
\def\@mmtsubmissiondate{TODO 01. Januar 1970}
\def\@mmtsupervisor{Dipl.-Medieninf. Andreas Rümpel}
\def\@mmtsupervisorii{TODO}

\newcommand*\mmtype[1]{\def\@mmtype{#1}}
\newcommand*\mmtitle[1]{\def\@mmtitle{#1}}
\newcommand*\mmtshorttitle[1]{\def\@mmtshorttitle{#1}}
\newcommand*\mmtauthor[1]{\def\@mmtauthor{#1}}
\newcommand*\mmtsubmissionmonth[1]{\def\@mmtsubmissionmonth{#1}}
\newcommand*\mmtsubmissiondate[1]{\def\@mmtsubmissiondate{#1}}
\newcommand*\mmtsupervisor[1]{\def\@mmtsupervisor{#1}}
\newcommand*\mmtsupervisorii[1]{\def\@mmtsupervisorii{#1}}
%### end of meta data

%### hyperref
\usepackage[
	pdftex,
	hyperfootnotes=false,
	bookmarks,
	pdfpagelabels=true,
	plainpages=false
]{hyperref}


	
\definecolor{lc}{cmyk}{0.9,0.6,0,0.4} % for screen output
%\newcommand{\printoutput}{\definecolor{lc}{rgb}{0,0,0}} % caused problems with black printing
\newcommand{\printoutput}{\definecolor{lc}{cmyk}{0,0,0,1}} % for print output

% defer hypersetup to set the right information for pdf metadata
\newcommand{\mmthypersetup}{\hypersetup{
	pdftitle={\@mmtitle},
	pdfauthor={\@mmtauthor},
	pdfsubject={\@mmtitle},
	pdfkeywords={\@mmtitle},
	pdftoolbar=true,
	bookmarksopen,
	bookmarksnumbered=false,
	bookmarksopenlevel=1,
	pdfdisplaydoctitle,	
	colorlinks=true,
	linkcolor=lc,
	citecolor=lc,
	filecolor=lc,
	menucolor=lc,
	urlcolor=lc,	
	%pdfstartview=FitV,
	%pdfcreator={LaTeX},
	%pagecolor=lc,
}}
%### end of hyperref

%### glossaries
\usepackage[nonumberlist,acronym]{glossaries}
\renewcommand*{\glspostdescription}{} % remove dot at end of description
\makeglossaries
%### end of glossaries

\usepackage[ngerman]{babel}
\usepackage[autostyle=true,german=guillemets]{csquotes} % type of quotes -- german=quotes|guillemets
\usepackage[style=alphabetic,backref=true]{biblatex}


%### custom headings
\usepackage{scrpage2}
\pagestyle{scrheadings}
\renewcommand*{\chapterpagestyle}{scrheadings}

\clearscrheadfoot
\lohead{\@mmtshorttitle}
\rohead{\headmark}
\lofoot{Copyright TU Dresden, \@mmtauthor}
\rofoot{\thepage}

\setkomafont{pageheadfoot}{\normalfont\footnotesize}
\setkomafont{pagenumber}{\normalfont\footnotesize}
%### end of custom headings

%### macros for often used german abbreviations
% TODO

%### generate title page, confirmation, toc
\newcommand{\mmtfrontmatter}{
%### title page
\begin{titlepage}
\center \vspace*{3em}
\huge\textbf{\textsf{\@mmtitle}}\\
\vspace{5em}
\normalsize
\@mmtype\\
Technische Universität Dresden\\
\@mmtsubmissionmonth\\
\vspace{4em}
\Large\@mmtauthor\\
\vspace{4em}
\normalsize 
Betreuer: \@mmtsupervisor\ifthenelse{\equal{\@mmtsupervisorii}{TODO}}{\\}{,\\\@mmtsupervisorii\\}
\vspace{1em}
Fakultät Informatik\\
Institut für Software- und Multimediatechnik\\
Professur für Multimediatechnik\\			
\vspace{3em} 			 
\includegraphics[width=3.5cm]{mmt-logo} 
\end{titlepage} 


}